package com.atguigu.gmall.item.controller;


import com.atguigu.gmall.item.service.ItemService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Map;

/**
 * 商品详情页展示控制层
 */
@RequestMapping("/item/info")
@RestController
public class ItemController {
    @Resource
    private ItemService itemService;

    @GetMapping("/getSkuInfo/{skuId}")
    public Map<String, Object> getSkuInfo(@PathVariable("skuId") Long skuId){
        return (itemService.getSkuInfo(skuId));
    }
}
